Personally, I'd go with option 2 until such time that I could prove option 1 had much better (and needed) performance. If you choose option 1, make sure packet is a member of the struct.
Copying a few bytes (whether by memcpy or strcpy) is insignificant to the time it took to transmit those bytes over the net, or what other work you have planned later on.
> unsigned char storageArea[300]; //300 is an expected length
Or you could have a char pointer (as per case 1) then allocate the exact space you need, then copy the data.


CornedBee
Thx a lot